<%-------------------------------------------------------------------
 * 页面名称：drawToSelf_4.jsp
 * 功能描述：提现审核失败--提现信息修改页面
 * Action: 
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ page import="cn.agiledata.bank.common.util.Constant"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/conf/tld/agiledata.tld" prefix="ad"%>
<%
String path = request.getContextPath();
%>
<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/newstyle.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/common.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src='<%=path%>/dwr/util.js'></script>
<script type='text/javascript' src='<%=path%>/js/ufront.js'></script>
<script type='text/javascript' src='<%=path%>/dwr/engine.js'></script>
<script type='text/javascript'
	src='<%=path%>/dwr/interface/accountTemplate.js'></script>
<script type='text/javascript' src='<%=path%>/js/vnv/commonForManage.js'></script>
<script type='text/javascript'
	src='<%=path%>/js/vnv/commonForCnAmount.js'></script>
<script type='text/javascript' src='<%=path%>/js/vnv/tomoney.js'></script>
<script language="JavaScript" type="text/JavaScript">
function dosubmit(){
	document.forms["0"].submit();
}
function submitProcess() {
	if(checkNecessaryInput(document.forms["0"])){				
		if(document.forms[0].remark.value.length>85){
			alert("备注长度不能大于85！");
			return;
		}
		dosubmit();
	}
}
function cancelTransaction() {
	var transId = document.forms[0].id.value;
	var batchType = "false";
	if (confirm('您确定要取消此交易吗？')) {
		location.href='<%=path%>/page/transaction/esPerPayTransPayDel.do?batchType='+batchType+'&oldStatus=<%=Constant.ES_TRANS_STATUS_REJECTED%>&transactionID='+transId;
	}
}
function updatePrompt(data) {
	if (data==2){
		//top.showFault('此账户没有足够资金，请重新输入！')
		alert('此账户没有足够资金，请重新输入！');
		document.forms[0].amount.value="";
    	document.forms[0].upperAmount.value="";
		return;
	}
	if (data == 1){
		//top.showFault('请输入转出金额！');
		alert('请输入转出金额！');
		document.forms[0].amount.focus();
    	document.forms[0].upperAmount.value="";
		return; 
	} 
}
function kd() {
	var ss=getObj("amount").value;
	ss = ss.replace(/ /g,"");
	if (ss=="") {
		getObj("upperAmount").value="";
		return;
	}
	
	var sDispMsg = getChineseCurrencyString(ss);
	if(sDispMsg==-1) sDispMsg="错误的金额!";
	if(sDispMsg==-2) sDispMsg="太长的金额!";
	getObj("upperAmount").value=sDispMsg;
}
</script>
<div id="main">
	<div class="content_right">
		<div style="width:745px;margin-left:10px;">
			<div class="titleinfo">
				账户提现
			</div>
			<div class="edit_pass">
				<table width="100%" border="0" align="center" cellpadding="5"
					cellspacing="1">
					<html:form action="/esPerPayTransPayUpdate.do">
						<html:hidden name="EsPrePayTransForm" property="id" />
						<tr>
							<td align="right">
								交易ID：
							</td>
							<td>
								<bean:write name="EsPrePayTransForm" property="transId" />
							</td>
						</tr>
						<tr>
							<td width="23%" align="right">
								提现子账户：
							</td>
							<td width="77%">
								<div class="select">
									<div>
										<html:select name="EsPrePayTransForm" property="debitId">
											<html:options collection="subAccounts" property="id"
												labelProperty="accountName" />
										</html:select>
									</div>
								</div>
							</td>
						</tr>
						<%--<tr>
							<td align="right">
								收款银行账户名称：
							</td>
							<td>
								<div class="select">
									<div>
										<html:select name="EsPrePayTransForm" property="bankSeq"
											alt="收款银行账户名称" disabled="true">
											<html:options collection="BankList" property="id"
												labelProperty="bankAlias" />
										</html:select>
									</div>
								</div>
								&nbsp;&nbsp;
								<a
									href="<%=path%>/page/myspace/accountList.do?modifyType=moveOut"
									class="dropblue14b">添加银行账户</a>
							</td>
						</tr>
						--%><tr>
							<td align="right">
								收款银行账户账号：
							</td>
							<td>
								<ad:BankCardNum name="BankList" filter="false"
									inputId="bankSeq" />
							</td>
						</tr>
						<tr>
							<td align="right">
								<span class="orang12b">*</span> 提现金额：
							</td>
							<td>
								<logic:notPresent name="amount">
									<html:text name="EsPrePayTransForm" property="amount"
										alt="提现金额" size="50" styleClass="inputStyle"
										onblur="if(checkDecimalInput(this,0)){accountTemplate.compareAccountMoney(document.getElementById('debitId').value,this.value, updatePrompt)} ;tomoney('forms[0]','amount','hideTransAmt');kd();"
										onkeyup="kd();" onchange="kd();" />元 
			  <input type="hidden" name="hideTransAmt" value="">
								</logic:notPresent>
								<logic:present name="amount">
									<input type="hidden" name="amount"
										value="<bean:write name="amount"/>" />
									<bean:write name="amount" />
								</logic:present>
							</td>
						</tr>
						<tr>
							<td align="right">
								提现金额大写：
							</td>
							<td>
								<input type="text" name="upperAmount" size="50"
									class="inputStyleNoborder" readonly />
							</td>
						</tr>
						<tr>
							<td align="right">
								手续费收取方法：
							</td>
							<td class="fontgraydrop14">
								<bean:write name="feeRatio" />
							</td>
						</tr>
						<tr>
							<td align="right">
								<span class="orang12b">*</span> 资金用途：
							</td>
							<td>
								<html:text name="EsPrePayTransForm" property="purpose"
									alt="资金用途" maxlength="85" size="50" styleClass="inputStyle" />
								<span class="font_gray">(最长85个字符) </span>
							</td>
						</tr>
						<tr>
							<td align="right">
								备注：
							</td>
							<td>
								<html:textarea name="EsPrePayTransForm" property="remark"
									rows="5" cols="35" style="inputStyle" />
								<span class="font_gray">(最长85个字符) </span>
							</td>
						</tr>
					</html:form>
					<logic:notEqual name="EsPrePayTransForm" property="errorMsg"
						value="">
						<tr>
							<td height="25" align="center">
								&nbsp;
								<font color="#FF0000"><bean:write
										name="EsPrePayTransForm" property="errorMsg" /> </font>
							</td>
						</tr>
					</logic:notEqual>
					<tr>
						<td height="55" align="right">
							&nbsp;
						</td>
						<td>
							<logic:notEmpty name="aqb" property="batchNo">
								<html:hidden name="aqb" property="batchType" value="true" />
							</logic:notEmpty>
							<input type="button" name="btA" value="提交重审" class="button_style"
								onclick="submitProcess();"
								<logic:present name="b2c_notavaiable">disabled</logic:present> />
							&nbsp;&nbsp;
							<input type="button" name="btC" value="取 消" class="button_style"
								onclick="cancelTransaction();" />
							&nbsp;&nbsp;
							<input type="button" name="btC" value="返 回" class="button_style"
								onclick="history.back(-1);" />
						</td>
					</tr>
				</table>
		<table width="100%" border="0" align="center" cellpadding="7"
										cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
										<tr>
											<td bgcolor="#fffdf5">
												<table width="100%" border="0" cellpadding="3"
													cellspacing="0">
													<tr>
														<td width="3%" height="25" valign="top"
															style="border-bottom:1px solid #ccc;"></td>
														<td width="97%" align="left" class="red12b"
															style="border-bottom:1px solid #ccc;">
															特别提醒
														</td>
													</tr>
								<tr>
									<td valign="top">
										&nbsp;
									</td>
									<td align="left" class="font_gray">
										<span class="lan">您可以对提现信息 进行修改！</span>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="<%=path%>/js/layer.js"></script>
<script language="JavaScript" type="text/JavaScript">
function closeLayer(returnValue, type){
	hideLayer();
	if(type=="amount"){
		document.forms[0].amount.value=returnValue;
		document.forms[0].amount.focus();
		kd();
	}
}
function amountSelect(){
 	agiledata.getUserInternal(amountPopup);
}
function amountPopup(data) {
  	if(data) {
	 	openLayer("<%=path%>/page/common/simpleCalculator.jsp",400,200,false);
	} else {
		location.href="<%=path%>/page/util/session_invalid.jsp";
	}
}

//显示预先设置的金额的大写
kd();
</script>
